package com.yhq.basic.jvm.dataarea;

/**
 * 观察try catch finally 在 线程栈和程序计数器的表现形式
 * 工具：ByteCode查看
 * @author hqyin
 * @date 2024/2/21 3:13 PM
 */
public class Demo2TryCatch {
    public static void main(String[] args) {
        int x = 1;
        try{
           System.out.println(x);
        }catch (Exception e) {
            x=2;
            System.out.println(x);
        }finally {
            x=3;
            System.out.println(x);
        }
    }
}
